import java.time.DayOfWeek;
import java.util.Scanner;

public class Jishuanqi {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		  System.out.println("请输入年份");
		  int year=sc.nextInt();
		  System.out.println("请输入月份");
		  int month=sc.nextInt();
		  int day=0;
	switch (month) {
	case 1:
	case 3:
	case 5:
	case 7:
	case 8:
	case 10:
	case 12:
		getDay();
		break;
	case 4:
	case 6:
	case 9:
	case 11:
		getDa();
		break;
	case 2:
		if (year % 4==0 && year % 100 !=0 || year % 400==0) {
			getRui();
		}else {
			getPin();
		}
		break;
	default:
		System.out.println("错误的年份");
		break;
	   }
	
	}


	public static int getDay() { 
		System.out.println("31天");
		return 31;
	}	
	public static int getDa() { 
		System.out.println("30天");
		return 30;
	}	
	public static int getRui() { 
		System.out.println("29天");
		return 29;
	}	
	public static int getPin() { 
		System.out.println("28天");
		return 28;
	}	
}
